package com.vdong.supplier.http;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 测试环境
 *
 * @author liangwei
 */
@FeignClient(url = "http://testapi.kdniao.cc:8081", name = "postQuerClassServiceHttpClient")
public interface TestPostQuerClassServiceHttpClient {

    @RequestMapping(value = "/api/EOrderService", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE
            + ";charset=UTF-8", produces = "text/html;charset=UTF-8")
    String EbusinessOrderClient(@RequestParam("RequestData") String RequestData,
                                @RequestParam("EBusinessID") String EBusinessID, @RequestParam("RequestType") String RequestType,
                                @RequestParam("DataSign") String DataSign, @RequestParam("DataType") String DataType);

    @RequestMapping(value = "/api/OOrderService", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE
            + ";charset=UTF-8", produces = "text/html;charset=UTF-8")
    String EbusinessOOrderClient(@RequestParam("RequestData") String RequestData,
                                 @RequestParam("EBusinessID") String EBusinessID, @RequestParam("RequestType") String RequestType,
                                 @RequestParam("DataSign") String DataSign, @RequestParam("DataType") String DataType);

    /**
     * 取消订单
     *
     * @param RequestData
     * @param EBusinessID
     * @param RequestType
     * @param DataSign
     * @param DataType
     * @return
     */
    @RequestMapping(value = "/Ebusiness/EbusinessOrderHandle.aspx", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE
            + ";charset=UTF-8", produces = "text/html;charset=UTF-8")
    String EbusinessOrderHandleClient(@RequestParam("RequestData") String RequestData,
                                      @RequestParam("EBusinessID") String EBusinessID, @RequestParam("RequestType") String RequestType,
                                      @RequestParam("DataSign") String DataSign, @RequestParam("DataType") String DataType);
}
